package com.demo.gulimall.cart.feign;

import com.demo.gulimall.cart.vo.SkuInfoVo;
import com.demo.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Chen Yuan
 * @create 2023-06-19  16:37
 */
@FeignClient("mall-product")
public interface ProductFeignService {

	@GetMapping("/product/skuinfo/{skuId}")
	public R<SkuInfoVo> skuInfo(@PathVariable("skuId") Long skuId);

	@GetMapping("/product/skusaleattr/stringlist/{skuId}")
	public R<List<String>> getSkuSaleAttrValuesBySkuId(@PathVariable("skuId") Long skuId);

	@GetMapping("/product/skuinfo/price")
	public R<BigDecimal> getSkuPriceById(@RequestParam("skuId") Long skuId);
}
